# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=difftastic
pkgver=0.61.0
pkgrel=0
pkgdesc="Diff tool that understands syntax"
url="https://difftastic.wilfred.me.uk/"
license="MIT"
arch="all"
makedepends="cargo openssl-dev cargo-auditable"
options="net"
source="https://github.com/Wilfred/difftastic/archive/$pkgver/difftastic-$pkgver.tar.gz"

prepare() {
	default_prepare
	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/difft -t "$pkgdir"/usr/bin/
}

sha512sums="
70b98788dc992e690486a71e2365f039c764af83917d51c92a0efdc0e5030ce8f28c0064d7cac0fe51fec832cb8ae3c2b93e1af001a05ee2d54a70ebd1fa56df  difftastic-0.61.0.tar.gz
"
